package com.sync.platform.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * Database restore task entity
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("restore_task")
public class RestoreTask extends BaseEntity {

    /**
     * Task name
     */
    @TableField("name")
    private String name;

    /**
     * Target database ID
     */
    @TableField("database_id")
    private Long databaseId;

    /**
     * Backup file path
     */
    @TableField("backup_file_path")
    private String backupFilePath;
    
    /**
     * Original file name
     */
    @TableField("original_file_name")
    private String originalFileName;

    /**
     * Task description
     */
    @TableField("description")
    private String description;

    /**
     * Last execution time
     */
    @TableField("last_execution_time")
    private LocalDateTime lastExecutionTime;

    /**
     * Last execution result (0: failed, 1: success)
     */
    @TableField("last_execution_result")
    private Integer lastExecutionResult;

    /**
     * Last execution message
     */
    @TableField("last_execution_message")
    private String lastExecutionMessage;

    /**
     * Task status (0: disabled, 1: enabled)
     */
    @TableField("status")
    private Integer status;
} 